<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('试卷名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" name="row[name]" class="form-control" data-rule="required"  type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label for="c-attachment" class="control-label col-xs-12 col-sm-2">试卷文件:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-attachment" data-rule="" class="form-control" size="50" name="row[attachment]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-attachment" class="btn btn-danger faupload" data-input-id="c-attachment" data-mimetype="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" data-multiple="false" data-preview-id="p-attachment"><i class="fa fa-upload"></i> 上传</button></span>
                </div>
                <span class="msg-box n-right" for="c-attachment"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-attachment"></ul>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('试卷模板')}:</label>
        <div class="col-xs-12 col-sm-8">
            <a href="/assets/template/import_template.xlsx" target="_blank" class="btn btn-success" title="点击下载试卷模板"><i class="fa fa-download"></i> 点击下载试卷模板</a>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('导入目标')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control" readonly type="text" value="{$courseInfo.name}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('导入分类')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-extend_id" data-rule="required" min="0" data-params='{"custom[course_id]":{$courseInfo.id}}' data-source="user/questioncategory/search/course_id/" class="form-control selectpage" name="row[extend_id]" type="text" value="{$extend_id|htmlentities}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
